<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <div id="app"></div>
    <template id="t1">
      <div>
        <button @click="(event)=>{ log(event) }">
          (event)=>{ log(event) }
        </button>
        <hr />
        <button @click="log($event)">log($event)</button>
        <hr />
        <button @click="say">say()</button>
      </div>
    </template>
    <script src="./vue.js"></script>
    <script>
      // 数据驱动视图
      const vm = new Vue({
        el: "#app",
        template: "#t1",
        data: {
          count: 0,
        },
        methods: {
          say: (event) => {
            console.log(event);
          },
          log(e) {
            console.log(e);
          },
        },
      });
    </script>
  </body>
</html>
